package com.ty.controller;

import com.ty.entity.OutMasterQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.ty.entity.OutMaster;
import com.ty.service.OutMasterService;

import java.util.List;

/**
 * 销售出库批次明细表;(212_out_master)控制层
 * @author : heimi
 * @date : 2025-6-10
 */
@RestController
@RequestMapping("/api/outMaster")
public class OutMasterController{
    @Autowired
    private OutMasterService outMasterService;
    
    /** 
     * 查询接口
     */
     @GetMapping
     public List<OutMaster> select(OutMasterQuery query){
        return outMasterService.select(query);
    }
    
    @PostMapping 
    public Integer insert(@RequestBody OutMaster product){
       return outMasterService.insert(product);
    }
    
    @PutMapping 
    public Integer update(@RequestBody OutMaster product){
        return outMasterService.update(product);
    }
    
    @DeleteMapping
    public Integer delete(Integer id){
        return outMasterService.delete(id);
    }
}